/*
 * Copyright 2011 Digia Oyj - Jaakko Purhonen <jaakko.purhonen@digia.com>
 */

#ifndef TRACEXPORTSETTINGSWIDGET_H
#define TRACEXPORTSETTINGSWIDGET_H

#include "xmlrpc/xmlrpcrequest.h"
#include <QtGui/QWidget>

namespace XmlRpc {
class XmlRpcConnection;
class XmlRpcResponse;
class XmlRpcRequest;
}

namespace Trac {
namespace Internal {

namespace Ui {
    class TracExportSettingsWidget;
}

class TracExportSettingsWidget : public QWidget
{
    Q_OBJECT
public:
    explicit TracExportSettingsWidget(QWidget *parent = 0);
    ~TracExportSettingsWidget();

    bool isValid() const;
    void createProject();

signals:
    void validChanged(bool value);

private slots:
    void checkIsValid();

private:
    Ui::TracExportSettingsWidget *ui;
    bool m_valid;
    XmlRpc::XmlRpcConnection* m_connection;
    XmlRpc::XmlRpcRequest m_request;
    bool validateTermsOfUseCheckBox();
};

} // namespace Internal
} // namespace Trac

#endif // TRACEXPORTSETTINGSWIDGET_H
